!Task Catalog
(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)
This section lists all the built in task names, and the arguments each one accepts.
These are used when calling vrf:startSubtask() or vrf:sendTask(). See these functions for information on using these parameters.
There are three kinds of tasks listed here: built-in C++ tasks, Scripted tasks, and (scripted) Reactive tasks. If the first line after the task name says "Scripted Task" or "Reactive Task," then that directly indicates what type of task it is. If neither is stated, then it is a built-in C++ task. Only built-in or Scripted tasks can be used in the vrf functions above. Reactive tasks are the only tasks that can be used in the various Set commands that control reactive tasks.
Scripted and Reactive Tasks further indicate what SMS they are found in, and what category folder they can be found in inside the Simulation Scripts dialog box. When VR-Forces is running in a particular SMS, it cannot invoke a Scripted Task from another SMS.
Note:
- Any argument which is a simulation object will accept either the SimObject or a string name of the object.
- If a task does not have parameters, you must include empty braces in the command, for example vrf:sendTask("wait", {}).
convoy-along
- allow_task_visualizations [Type: Boolean, Default: true]
- control_object [Type: SimObject]
- Name of the route to convoy along.
convoy-to
- allow_task_visualizations [Type: Boolean, Default: true]
- control_object [Type: SimObject]
- Name of the control object to convoy to such as a waypoint.
- path_plan_flag [Type: Boolean, Default: false]
- Sets whether the aggregate should path plan to the control object or not when performing this task.
crash-into
- allow_task_visualizations [Type: Boolean, Default: true]
- target [Type: SimObject]
- Entity to crash into.
di-guy-animation
- allow_task_visualizations [Type: Boolean, Default: true]
- di_guy_animation_task_kind [Type: String, Default: ""]
- The name of the DI-Guy animation to play. Note The DI-Guy character for the specified entity must have an animation of this name for the task to succeed.
- di_guy_animation_duration [Type: Real, Default: 0]
- Number of seconds to play the animation. If -1, animation plays continuously. If 0, the animation plays once, for however long the particular animation is.
- di_guy_animation_number_of_times [Type: Integer, Default: 0]
- di_guy_using_animation_offset [Type: Boolean, Default: false]
- di_guy_animation_offset [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- di_guy_transition_speed [Type: Real, Default: 1]
di-guy-gesture
- allow_task_visualizations [Type: Boolean, Default: true]
- gesture [Type: String, Default: ""]
- The name of the gesture to perform. Available gestures will depend on the DI-Guy character.
- wait_until_complete [Type: Boolean, Default: true]
- If set to true, entity will wait until the duration of the gesture is complete before moving onto the next gesture.
disembark-all-entity
- allow_task_visualizations [Type: Boolean, Default: true]
disembark-entity
- allow_task_visualizations [Type: Boolean, Default: true]
embark
- allow_task_visualizations [Type: Boolean, Default: true]
- parent [Type: SimObject] (Aliases: parent_name)
- Entity to embark on.
- load_override [Type: Boolean, Default: false]
- If False, the position the entity takes once embarked is based on the configured embarkation slots on the host entity. If True, the embarkation slot information is ignored and load_orverride_position is used.
- load_override_position [Type: VectorOffset3D, Default: {0.000000, 0.000000, 0.000000}]
- The position, relative to the host entity origin, where the entity will be placed once embarked, if position override is used.
- embark_in_slot [Type: Integer, Default: -1]
- any_if_taken [Type: Boolean, Default: true]
- slot_name [Type: String, Default: "*"]
- slot_type [Type: String, Default: "*"]
embedded-set-forward
- allow_task_visualizations [Type: Boolean, Default: true]
- ee_name [Type: String, Default: ""]
- The name of the embedded entity.
embedded-task-forward-task
- allow_task_visualizations [Type: Boolean, Default: true]
- ee_name [Type: String, Default: ""]
- The name of the embedded entity.
- block_to_completion [Type: Boolean, Default: false]
- This task will block until the embedded entity completes the task.
ffe-on-entity
- allow_task_visualizations [Type: Boolean, Default: true]
- weapons_to_fire [Type: StringVector]
- A list of the weapon(s) to fire. Parameter can also specify to use ammo type ammoType by appending "ammoType" to the weapon name.
- number_of_rounds [Type: Integer, Default: 0]
- Number of rounds to be fired.
- dispersion_radius [Type: Real, Default: 0]
- Dispersion radius of the rounds, in meters.
- height_above_terrain [Type: Real, Default: 0]
- Meters above terrain for detonation.
- muzzle_Speed [Type: Real, Default: 0]
- The desired muzzle speed.
- muzzle_orienation [Type: DtVector3D, Default: {0.000000, 0.000000, 0.000000}]
- The desired muzzle orientation.
- entity [Type: SimObject] (Aliases: entity_name)
- Target entity.
ffe-on-location
- allow_task_visualizations [Type: Boolean, Default: true]
- weapons_to_fire [Type: StringVector]
- A list of the weapon(s) to fire. Parameter can also specify to use ammo type ammoType by appending "ammoType" to the weapon name.
- number_of_rounds [Type: Integer, Default: 0]
- Number of rounds to be fired.
- dispersion_radius [Type: Real, Default: 0]
- Dispersion radius in meters.
- height_above_terrain [Type: Real, Default: 0]
- Meters above terrain for detonation.
- muzzle_Speed [Type: Real, Default: 0]
- The desired muzzle speed.
- muzzle_orienation [Type: DtVector3D, Default: {0.000000, 0.000000, 0.000000}]
- The desired muzzle orientation.
- location [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Target location.
ffe-on-target
- allow_task_visualizations [Type: Boolean, Default: true]
- weapons_to_fire [Type: StringVector]
- A list of the weapon(s) to fire. Parameter can also specify to use ammo type ammoType by appending "ammoType" to the weapon name.
- number_of_rounds [Type: Integer, Default: 0]
- Number of rounds to be fired.
- dispersion_radius [Type: Real, Default: 0]
- Dispersion radius in meters.
- height_above_terrain [Type: Real, Default: 0]
- Meters above terrain for detonation.
- muzzle_Speed [Type: Real, Default: 0]
- The desired muzzle speed.
- muzzle_orienation [Type: DtVector3D, Default: {0.000000, 0.000000, 0.000000}]
- The desired muzzle orientation.
- target [Type: SimObject] (Aliases: target_name)
- Target object.
fire-at-target
- allow_task_visualizations [Type: Boolean, Default: true]
- auto_select_weapon [Type: Boolean, Default: false]
- If true, the entity will automatically select the most approprite weapon to fire. If false, the specified weapon is used.
- weapon_to_fire [Type: String, Default: ""]
- Name of weapon to fire. Varies based on entity. Names are available in VRF GUI.
- target [Type: SimObject]
- Target entity.
- max_rounds_to_fire [Type: Integer, Default: 1]
- Maximum rounds to fire. Fewer rounds will be fired if target is destroyed before this number is reached.
fire-cruise-missile
- allow_task_visualizations [Type: Boolean, Default: true]
- target [Type: SimObject] (Aliases: target_name)
- Target object of the missile.
- weapons_to_fire [Type: StringVector]
- detonation_proximity [Type: Real, Default: 0]
- The missile will detonate when within this distance (in meters) of the target object.
- route [Type: SimObject] (Aliases: route_name)
- If specified, the cruise missile will move along this route before flying toward the target. If not specified, the missile will fly directly to its target.
- speed [Type: Real, Default: 0]
- The speed, in meters/second, of the missile.
fly-along
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject]
- Route to fly along
- traversal_direction [Type: Integer, Default: 0]
- Direction along route to fly. 0 = start to end, 1 = end to start.
- start_at_closest_point [Type: Boolean, Default: false]
- If True, the entity starts at the closest point on the route, otherwise it starts at the first point.
- use_fixed_pitch [Type: Boolean, Default: false]
- If True, the aircraft flies directly from one point to the next at a fixed pitch, gradually changing altitude along the way. If False, it flies to the target altitude of the next point on the route based on the climb/descent rate of the aircraft, and typically reaches the target altitude before it has arrived at the next point.
fly-altitude
- allow_task_visualizations [Type: Boolean, Default: true]
- altitude [Type: Real, Default: 1000]
- Altitude in meters (MSL)
- climb_descent_rate [Type: Real, Default: 5.08]
- Climb/descent rate in meters/second.
fly-heading
- allow_task_visualizations [Type: Boolean, Default: true]
- heading [Type: Real, Default: 0]
- Heading in radians.
- use_magnetic [Type: Boolean, Default: false]
- turn_rate [Type: Real, Default: 0.05236]
- Turn rate in radians/second
- turn_direction [Type: Integer, Default: 0]
- 0 = Make smaller turn, 1 = Right turn only, -1 = Left turn only.
fly-heading-and-altitude
- allow_task_visualizations [Type: Boolean, Default: true]
- heading [Type: Real, Default: 0]
- Heading in radians.
- use_magnetic [Type: Boolean, Default: false]
- turn_rate [Type: Real, Default: 0.05236]
- Turn rate in radians/second
- altitude [Type: Real, Default: 1000]
- Altitude in meters.
- climb_descent_rate [Type: Real, Default: 5.08]
- Climb/descent rate in meters/second
- turn_direction [Type: Integer, Default: 0]
- 0 = Make smaller turn, 1 = Right turn only, -1 = Left turn only.
fly-to-location
- allow_task_visualizations [Type: Boolean, Default: true]
- aiming_point [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location3D object specifying the location.
- use_fixed_pitch [Type: Boolean, Default: false]
- If True, the aircraft flies directly to the point at a fixed pitch, gradually changing altitude along the way. If False, it flies to the target altitude of the target point based on the climb/descent rate of the aircraft, and typically reaches the target altitude before it has arrived at the point.
follow-entity
- allow_task_visualizations [Type: Boolean, Default: true]
- entity [Type: SimObject]
- Entity to follow.
- offset [Type: VectorOffset3D, Default: {-25.000000, 0.000000, 0.000000}]
- Position relative to the target entity to maintain. Specified in meters [Right, Forward, Up]
hold-until
- allow_task_visualizations [Type: Boolean, Default: true]
- time_to_stop [Type: Real, Default: 0]
internal-transfer-fuel
- allow_task_visualizations [Type: Boolean, Default: true]
- amount [Type: Real, Default: 0]
- max_amount [Type: Boolean, Default: false]
- rate [Type: Real, Default: 0]
landing
- allow_task_visualizations [Type: Boolean, Default: true]
- landing_strip [Type: SimObject] (Aliases: landing_strip_name)
- A two point route representing the runway to land on.
lase-location
- allow_task_visualizations [Type: Boolean, Default: true]
- location [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location to lase.
lase-target
- allow_task_visualizations [Type: Boolean, Default: true]
- target [Type: SimObject]
- Target to lase.
launch-expendable-resource
- allow_task_visualizations [Type: Boolean, Default: true]
- expendable_resource_name [Type: String, Default: ""]
- Resource name to launch.
- number_to_fire [Type: Integer, Default: 1]
- Total number to launch.
- time_interval [Type: Real, Default: 1]
- Time in seconds between launches.
launch-smoke
- allow_task_visualizations [Type: Boolean, Default: true]
- launch_at_nearest_threat [Type: Boolean, Default: true]
- If True, the grenade is launched in the direction of the nearest hostile entity. If False, the heading parameter is used.
- heading [Type: Real, Default: 0]
- Used only if launch_at_nearest_threat is false. The heading to launch the grenade.
- use_magnetic [Type: Boolean, Default: false]
move-along
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject]
- The route object to move along.
- traversal_direction [Type: Integer, Default: 0]
- Direction along route to move.
- Accepted values:
- 0 - Start to end
- 1 - End to start
- start_at_closest_point [Type: Boolean, Default: false]
- If true, entity starts at the nearest point along the route. Otherwise, it starts at the first point on the route.
- speed [Type: Real, Default: 0]
- Speed to move along the route.
move-along-retrograde
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject]
- The route object to move along.
- traversal_direction [Type: Integer, Default: 0]
- Direction along route to move.
- Accepted values:
- 0 - Start to end
- 1 - End to start
- start_at_closest_point [Type: Boolean, Default: false]
- If true, entity starts at the nearest point along the route. Otherwise, it starts at the first point on the route.
- speed [Type: Real, Default: 0]
- Speed to move along the route.
move-along-with-actions
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject]
- traversal_direction [Type: Integer, Default: 0]
- start_at_closest_point [Type: Boolean, Default: false]
- speed [Type: Real, Default: 0]
- time_on_target [Type: Real, Default: 0]
- time_on_target_position [Type: Real, Default: 0]
- loiter_position [Type: Real, Default: 0]
- abandon_if_time_not_achievable [Type: Boolean, Default: false]
- action_list [Type: Unknown]
move-into-formation
- allow_task_visualizations [Type: Boolean, Default: true]
- location [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location on with the formation should be centered.
- heading [Type: Real, Default: 0]
- The heading of the formation.
- formation_name [Type: String, Default: ""]
- The name of the formation. This must be a formation name that is configured for the aggregate.
move-to
- allow_task_visualizations [Type: Boolean, Default: true]
- control_point [Type: SimObject] (Aliases: destination)
- Object to be moved to.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
move-to-altitude
- allow_task_visualizations [Type: Boolean, Default: true]
- altitude [Type: Real, Default: 0]
- Altitude in meters
move-to-location
- allow_task_visualizations [Type: Boolean, Default: true]
- aiming_point [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Target location.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
move-to-location-retrograde
- allow_task_visualizations [Type: Boolean, Default: true]
- aiming_point [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Target location.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
move-to-retrograde
- allow_task_visualizations [Type: Boolean, Default: true]
- control_point [Type: SimObject] (Aliases: destination)
- Object to be moved to.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
orbit
- allow_task_visualizations [Type: Boolean, Default: true]
- center [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location to circle.
- entity [Type: SimObject]
- radius [Type: Real, Default: 2000]
- Distance from center the entity should maintain.
- clockwise [Type: Boolean, Default: true]
- If true, entity circles clockwise, otherwise counterclockwise.
patrol-route
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject]
- Route object to patrol.
patrol-two-points
- allow_task_visualizations [Type: Boolean, Default: true]
- first_control_point [Type: SimObject]
- First patrol point.
- second_control_point [Type: SimObject]
- Second patrol point.
plan-and-move-to
- allow_task_visualizations [Type: Boolean, Default: true]
- control_point [Type: SimObject] (Aliases: destination)
- Object to be moved to.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
plan-and-move-to-location
- allow_task_visualizations [Type: Boolean, Default: true]
- aiming_point [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Target location.
- continue_moving_flag [Type: Boolean, Default: false]
- If false, entity will slow down and stop as it approaches the destination. Otherwise, entity continues to move at speed, likely overshooting the destination.
- at_distance [Type: Real, Default: 1]
- Distance at which the entity should be considered at the destination.
- speed [Type: Real, Default: 0]
- Speed to move.
rail-path-move
- allow_task_visualizations [Type: Boolean, Default: true]
- destination_name [Type: SimObject]
- Destination object, if applicable.
- destination_name_specified [Type: Boolean, Default: false]
- True if the destination should be an object. False if it should be a location.
- destination [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Destination location if applicable.
- destination_is_route [Type: Boolean, Default: false]
- Indicates if the destination object is a route.
- traversal_direction [Type: Integer, Default: 0]
- Only applies if destination is a route. Direction along route to move.
- Accepted values:
- 0 - Start to end
- 1 - End to start
- start_at_closest_point [Type: Boolean, Default: false]
- Only applies if destination is a route. If true, entity will start at the closest point on the route, rather than the start point.
rail-route
- allow_task_visualizations [Type: Boolean, Default: true]
- route [Type: SimObject] (Aliases: destination_name)
- The route to move along.
- traversal_direction [Type: Integer, Default: 0]
- Direction along route to move.
- Accepted values:
- 0 - Start to end
- 1 - End to start
- start_at_closest_point [Type: Boolean, Default: false]
- If true, entity will start at the closest point on the route, rather than the start point.
release-bomb-on-laser-spot
- allow_task_visualizations [Type: Boolean, Default: true]
- ammunition_resource_name [Type: String, Default: ""]
- Name of the bomb ammunition resource to drop.
- detonation_proximity [Type: Real, Default: 0]
- Distance from the target (in meters) at which to detonate.
- laser_code [Type: Integer, Default: 0]
- Laser code to target, if unspecified the automatically generated laser code for the ownship is used.
release-bomb-on-location
- allow_task_visualizations [Type: Boolean, Default: true]
- ammunition_resource_name [Type: String, Default: ""]
- Name of the bomb ammunition resource to drop.
- detonation_proximity [Type: Real, Default: 0]
- Distance from the target (in meters) at which to detonate.
- location [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location to target.
release-bomb-on-target
- allow_task_visualizations [Type: Boolean, Default: true]
- ammunition_resource_name [Type: String, Default: ""]
- Name of the bomb ammunition resource to drop.
- detonation_proximity [Type: Real, Default: 0]
- Distance from the target (in meters) at which to detonate.
- target [Type: SimObject] (Aliases: entity_name)
- Name of the entity to target.
scripted-movement
- allow_task_visualizations [Type: Boolean, Default: true]
- move_out_heading [Type: Real, Default: 0]
- If the orientation is not defined and there is no reference object, this will be used as the heading to rotate the animation points around.
- scripted_movement_file [Type: String, Default: ""]
- The csv file that contains the animation.
- target_point [Type: SimObject]
- The point to base the reference of the data points in the movement file around.
- clamp_type [Type: Integer, Default: 4]
- The clamping type to apply to locations.
- Accepted values:
- 1 - Clamp high fidelity (includes orientation clamp)
- 2 - Clamp low fidelity
- 3 - Z value in data file is height above terrain
- 4 - No change, using geodetic height interpretation
- 5 - Conditional ground clamping (clamp if there is no defined altitude change)
- 6 - Phased radar face Cartesian (no clamping, topographic height interpretation, uses lateral positive left)
- 7 - No change, using topographic height interpretation
- completion_rule [Type: Integer, Default: 0]
- Indicates what happens when the animation is complete.
- Accepted values:
- 1 - Detonate
- 2 - Detonate and remove
- 3 - Remove
- 4 - Stay around at current speed
- 5 - Stay around and stop
- file_configuration [Type: String, Default: ""]
- The string that represents the configuration of the csv file.
- phase [Type: Integer, Default: 0]
- The phase number of the scripted movement.
send-text
- allow_task_visualizations [Type: Boolean, Default: true]
- destination [Type: SimObject] (Aliases: destination_name)
- Name of entity that is to receive the report. May use the string "DtBroadcast" to send to all eligible receivers.
- text [Type: String, Default: ""]
- The text in the report.
stop-moving
- allow_task_visualizations [Type: Boolean, Default: true]
takeoff
- allow_task_visualizations [Type: Boolean, Default: true]
- landing_strip [Type: SimObject] (Aliases: landing_strip_name)
- A two point route representing the runway.
target-entity
- allow_task_visualizations [Type: Boolean, Default: true]
- target [Type: SimObject]
- Object to target.
target-point
- allow_task_visualizations [Type: Boolean, Default: true]
- target [Type: Location3D, Default: {0.000000, 0.000000, 0.000000}]
- Location to target.
transfer-supplies
- allow_task_visualizations [Type: Boolean, Default: true]
- supply_type [Type: String, Default: 0:0:0:0:0:0:0]
- amount [Type: Real, Default: 0]
- max_amount [Type: Boolean, Default: false]
- rate [Type: Real, Default: 0]
- supplier [Type: SimObject]
turn-to-heading
- allow_task_visualizations [Type: Boolean, Default: true]
- heading [Type: Real, Default: 0]
- Target heading, in radians.
- mode [Type: Integer, Default: 0]
- Indicates how new heading should be determined.
- Accepted values:
- 0 - Absolute - Sets the heading to be the heading given.
- 1 - Relative to host - If embarked, sets the heading to be relative to the heading of the host object.
- 2 - Sets the heading to be the current heading + the delta given to be the new heading.
vertical-landing
- allow_task_visualizations [Type: Boolean, Default: true]
- control_object [Type: SimObject] (Aliases: control_object_name)
- Waypoint on which to land.
wait
- allow_task_visualizations [Type: Boolean, Default: true]
wait-duration
- allow_task_visualizations [Type: Boolean, Default: true]
- seconds_to_wait [Type: Real, Default: 0]
- Number of seconds to wait.
wait-elapsed
- allow_task_visualizations [Type: Boolean, Default: true]
- elapsed_time [Type: Real, Default: 0]
- The simulation time (in seconds) to wait until.
